package com.molichuxing.services.infrastructure.service;

import com.molichuxing.framework.dto.Paged;
import com.molichuxing.framework.service.RootService;
import com.molichuxing.services.infrastructure.dto.request.create.InvoiceCreateDto;
import com.molichuxing.services.infrastructure.dto.request.modify.InvoiceDto;
import com.molichuxing.services.infrastructure.dto.response.ContractDto;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 发票 服务类
 * </p>
 *
 * @author zhaopenghui
 * @since 2019-09-24
 */
public interface InvoiceService extends RootService {

    /**
     * 发票创建
     *
     * @param invoiceCreateDto
     * @return
     * @throws Exception
     */
    public Boolean createInvoice(InvoiceCreateDto invoiceCreateDto) throws Exception;

    /**
     * 发票批量创建
     *
     * @param list
     * @return
     * @throws Exception
     */
    public Boolean createInvoiceList(List<InvoiceCreateDto> list) throws Exception;

    /**
     * 发票修改
     *
     * @param orderCode
     * @return
     * @throws Exception
     */
    public Boolean modifyInvoice(Long orderCode) throws Exception;

    /**
     * 发票列表
     *
     * @param map
     * @param pageNum
     * @param pageSize
     * @return
     * @throws Exception
     */
    public Paged<InvoiceDto> getInvoicePage(Map<String, Object> map, Integer pageNum, Integer pageSize) throws Exception;

    /**
     * 通过id获取发票
     *
     * @param ids
     * @return
     */
    public Map<Integer, InvoiceDto> getInvoiceMap(List<Integer> ids);

    /**
     * 状态校验
     *
     * @param ids
     * @return
     */
    public Boolean getCheckStatusByIds(List<Integer> ids) throws Exception;

    /**
     * 根据id修改状态
     *
     * @param ids
     * @param status
     * @return
     * @throws Exception
     */
    public Boolean modifyStatusById(List<Integer> ids, Integer status) throws Exception;

    /**
     * 修改发票状态
     *
     * @return
     * @throws Exception
     */
    public Boolean modifyStatus() throws Exception;


    /**
     * 查询订单的数据
     * @return
     */
    List<InvoiceCreateDto> selectOrderData();

    /**
     * 查询订阅的订单数据
     * @return
     */
    List<InvoiceCreateDto> selectSubscribeOrderData();
}
